<?php
/**
 * Created by PhpStorm OF yuyi.
 * User: YUYI
 * Date: 2018/6/6 0006
 * Time: 下午 5:35
 * Administrator
 */

namespace app\common\model;



class Groups extends BaseModel
{
    protected $pk = 'id';

    protected $append = ['statusExplain'];

    public function getStatusExplainAttr($value,$data)
    {
        switch ($data['status']){
            case 99:return '有效';
            case 10:return '无效';
            default:return '未知状态';
        }
    }
}